﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace XDCCManager.Pages
{
	/// <summary>
	/// Interaction logic for ServerManager.xaml
	/// </summary>
	public partial class ServerManager : UserControl
	{
		public ServerManager()
		{
			InitializeComponent();
		}

		private void ServerList_Connect(object sender, EventHandlers.ServerEventArgs e)
		{
			if (Connect != null)
				Connect(this, e);
		}

		public Popups.ServerEditor Editor
		{
			get { return (Popups.ServerEditor)GetValue(EditorProperty); }
			set { SetValue(EditorProperty, value); }
		}

		// Using a DependencyProperty as the backing store for Editor.  This enables animation, styling, binding, etc...
		public static readonly DependencyProperty EditorProperty =
			DependencyProperty.Register("Editor", typeof(Popups.ServerEditor), typeof(ServerManager), new UIPropertyMetadata(null));

		public event EventHandler<EventHandlers.ServerEventArgs> Connect;
	}
}
